Method and apparatus for building motion vector list for motion vector prediction

ABSTRACT

Relating to the field of video coding, a method and an apparatus for building a motion vector list for motion vector prediction, which solve a problem of building motion vector lists of at least two PUs in a same coding unit in a serial manner, and improve the parallel processing capability. The method includes: obtaining spatial neighboring blocks of a current prediction block, where the current prediction block is located inside a current coding unit; determining available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and obtaining motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and adding the obtained motion vector predictors to the motion vector list.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of International Application No.PCT/CN2013/073817, filed on Apr. 7, 2013, which claims priority toChinese Patent Application No. 201210377579.4, filed on Oct. 8, 2012,both of which are incorporated herein by reference in their entireties.

TECHNICAL FIELD

The present invention relates to the field of video coding, and inparticular, to a method and an apparatus for building a motion vectorlist for motion vector prediction.

BACKGROUND

An interframe prediction technology in the High Efficiency Video Coding(HEVC) adopts a conventional Motion Compensated Prediction (MCP) method.For motion vector prediction, the HEVC adopts a multiple motion vectorscompetition method, which improves the accuracy of motion vectorprediction, thereby improving the coding compression performance.

The HEVC interframe prediction mode may include, but is not limited to,a Merge mode, a Skip mode, and so on, all of which use the multiplemotion vectors competition to perform interframe prediction. A motionvector list is used when motion vector prediction is performed. For theMerge mode and the Skip mode, the motion vector list is allowed tocontain at most four spatial motion vector predictors and one temporalmotion vector predictor, where the Merge mode and the Skip mode shareone motion vector list. A coder selects a best motion vector predictorfrom the motion vector list as a motion vector predictor of a currentPrediction Unit (PU), which may be called a prediction blockhereinafter.

A method for building the motion vector list may include:

As shown in FIG. 1, spatial neighboring blocks of the current PU mayinclude: a neighboring block A0 (a bottom-left reference blockcorresponding to a bottom-left corner position of the current PU), aneighboring block A1 (a left reference block corresponding to thebottom-left corner position of the current PU), a neighboring block B0(a top-right reference block corresponding to a top-right cornerposition of the current PU), a neighboring block B1 (a top referenceblock corresponding to the top-right corner position of the current PU),and a neighboring block B2 (a top-left reference block corresponding toa top-left position of the current PU). A Temporal Motion Vectorpredictor (TMVP) is a motion vector predictor corresponding to thecurrent PU in time domain.

Firstly, motion vector predictors are successively obtained from theneighboring blocks and the TMVP in a sequence of the neighboring blockA1, the neighboring block B1, the neighboring block B0, the neighboringblock A0, the neighboring block B2, and the TMVP. Then, the obtainedmotion vector predictors are added to the motion vector list accordingto a rule in the HEVC. The specific motion vector list building processis a technology well known by a person skilled in the art, so thatdetails will not be described herein again.

Further, a current Coding Unit (CU), which may be called a coding unithereinafter, may include at least two PUs, and motion vector lists ofthe at least two PUs are built in a serial manner.

During the implementation of the above motion vector list buildingprocess, it is found that the prior art has at least the followingproblem: if the current CU includes at least two PUs, and the motionvector lists of the at least two PUs are built in a serial manner, thespeed of building the motion vector lists of the at least two PUs in thesame CU is slow, thereby reducing the parallel processing capability.

SUMMARY

Embodiments of the present invention provide a method and an apparatusfor building a motion vector list for motion vector prediction, whichsolve the problem of building motion vector lists of at least two PUs ina same coding unit in a serial manner, and improve the parallelprocessing capability.

In order to achieve the above objective, the following technicalsolutions are adopted in the embodiments of the present invention.

In one aspect, a method for building a motion vector list for motionvector prediction is provided, which includes: obtaining spatialneighboring blocks of a current prediction block, where the currentprediction block is located inside a current coding unit; determiningavailable neighboring blocks of the current prediction block accordingto a partition manner of the current coding unit, where the availableneighboring blocks are located outside the current coding unit; andobtaining motion vector predictors from the available neighboring blocksin a preset sequence according to motion vector predictors of theavailable neighboring blocks, and adding the obtained motion vectorpredictors to the motion vector list.

In another aspect, an apparatus for building a motion vector list formotion vector prediction is provided, which includes: a receiverconfigured to obtain spatial neighboring blocks of a current predictionblock, where the current prediction block is located inside a currentcoding unit; and a processor configured to determine availableneighboring blocks of the current prediction block according to apartition manner of the current coding unit, where the availableneighboring blocks are located outside the current coding unit; andobtain motion vector predictors from the available neighboring blocks ina preset sequence according to motion vector predictors of the availableneighboring blocks, and add the obtained motion vector predictors to themotion vector list.

In the method and apparatus for building a motion vector list for motionvector prediction provided in the embodiments of the present invention,through the above solutions, when a motion vector list of a predictionblock is built, spatial neighboring blocks of the current predictionblock are obtained firstly, where the current prediction block islocated inside a current coding unit; available neighboring blocks ofthe current prediction block are determined according to a partitionmanner of the current coding unit, where the available neighboringblocks are located outside the current coding unit; and motion vectorpredictors are obtained from the available neighboring blocks in apreset sequence according to motion vector predictors of the availableneighboring blocks, and the obtained motion vector predictors are addedto the motion vector list. In this way, when the motion vector list ofthe prediction block is built, no neighboring block located inside thecurrent coding unit is considered. When the coding unit includes atleast two prediction blocks, motion vector lists of the at least twoprediction blocks may be built in a parallel manner, which increases thespeed of building the motion vector lists of the at least two predictionblocks in the same coding unit, and improves the parallel processingcapability.

BRIEF DESCRIPTION OF DRAWINGS

To illustrate the technical solutions in the embodiments of the presentinvention more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments. Theaccompanying drawings in the following description show merely someembodiments of the present invention, and a person of ordinary skill inthe art may still derive other drawings from these accompanying drawingswithout creative efforts.

FIG. 1 is a schematic structural diagram of a coding unit CU, a PU, andneighboring blocks according to an embodiment;

FIG. 2A to FIG. 2G are schematic structural diagrams of a coding unit CUwith different partition manners according to an embodiment;

FIG. 3 is a flowchart of a method for building a motion vector list formotion vector prediction according to an embodiment; and

FIG. 4 is a schematic structural diagram of an apparatus for building amotion vector list for motion vector prediction according to anembodiment.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present invention with reference to the accompanyingdrawings in the embodiments of the present invention. The describedembodiments are merely a part rather than all of the embodiments of thepresent invention. All other embodiments obtained by a person ofordinary skill in the art based on the embodiments of the presentinvention without creative efforts shall fall within the protectionscope of the present invention.

In the prior art, a CU may include at least two PUs, and motion vectorlists of the at least two PUs are built in a serial manner. That is,after the motion vector list is built for a current PU, a motion vectorlist starts to be built for the next PU.

The specific process may include:

As shown in FIG. 2A to FIG. 2G, a CU (solid line frame in figures) maybe further partitioned into multiple PUs. In the HEVC, the CU may haveseven partition manners. For example, in the partition manners shown inFIG. 2A to FIG. 2C, a current CU is partitioned into two PUs (PU1 andPU2) on left and right sides. For another example, in the partitionmanner shown in FIG. 2D, the current CU is partitioned into four PUs(PU1, PU2, PU3, and PU4), and other types are not described herein.

Taking the partition shown in FIG. 2A as an example, since a spatialreference block A1 of the PU2 is located inside the PU1, a motion vectorlist of the PU2 can start to be built only after PU1 coding is finished,where the motion vector lists of the PU1 and the PU2 are built in aserial manner. Specifically, the motion vector list of the PU1 isfirstly built according to the above method, and then the motion vectorlist of the PU2 is built according to the above method.

In this way, the speed of building the motion vector lists of at leasttwo PUs is slow, and the compression coding performance is degraded.

In order to solve the above problem that the speed of building themotion vector lists of at least two PUs is slow and the compressioncoding performance is degraded, a method for building a motion vectorlist for motion vector prediction is provided in an embodiment. As shownin FIG. 3, the method may include:

301: Obtain spatial neighboring blocks of a current prediction block,where the current prediction block is located inside a current codingunit.

302: Determine available neighboring blocks of the current predictionblock according to a partition manner of the current coding unit, wherethe available neighboring blocks are located outside the current codingunit.

303: Obtain motion vector predictors from the available neighboringblocks in a preset sequence according to motion vector predictors of theavailable neighboring blocks, and add the obtained motion vectorpredictors to the motion vector list.

Through the above solution, when building a motion vector list of aprediction block, spatial neighboring blocks of the current predictionblock are obtained firstly, where the current prediction block islocated inside a current coding unit; available neighboring blocks ofthe current prediction block are determined according to a partitionmanner of the current coding unit, where the available neighboringblocks are located outside the current coding unit; and motion vectorpredictors are obtained from the available neighboring blocks in apreset sequence according to motion vector predictors of the availableneighboring blocks, and the obtained motion vector predictors are addedto the motion vector list. In this way, when the motion vector list ofthe prediction block is built, no neighboring block located inside thecurrent coding unit is considered. When the coding unit includes atleast two prediction blocks, motion vector lists of the at least twoprediction blocks may be built in a parallel manner, which increases thespeed of building the motion vector lists of the at least two predictionblocks in the same coding unit, and improves the parallel processingcapability.

Another method for building a motion vector list for motion vectorprediction is provided in an embodiment, and the method is further anextension of the method shown in FIG. 3. As shown in FIG. 3, the methodmay include:

301: Obtain spatial neighboring blocks of a current prediction block,where the current prediction block is located inside a current codingunit.

As shown in FIG. 1, the spatial neighboring blocks of the predictionblock may include: a neighboring block A0 located at a bottom-left sideof the prediction block, a neighboring block A1 located at a left sideof the prediction block, a neighboring block B0 at a top-right side ofthe prediction block, a neighboring block B1 at a top side of theprediction block, and a neighboring block B2 at a top-left side of theprediction block.

A method for obtaining the spatial neighboring blocks of the predictionblock, the prediction block, and the neighboring blocks is not limitedin this embodiment, and is a technology well known by a person skilledin the art, so that details will not be described herein again.

302: Determine available neighboring blocks of the current predictionblock according to a partition manner of the current coding unit, wherethe available neighboring blocks are located outside the current codingunit.

Further, as shown in FIG. 2E to FIG. 2G, if the current coding unit CUis partitioned into a first prediction block PU1 and a second predictionblock PU2 on top and bottom sides, and the current prediction block isthe second prediction block PU2, the available neighboring blocks of thePU2 include: the neighboring block A0, the neighboring block A1, theneighboring block B0, and the neighboring block B2 of the secondprediction block. At this time, the neighboring block B1 is locatedinside the current coding unit CU, and does not act as the availableneighboring block of the second prediction block PU2.

As shown in FIG. 2A to FIG. 2C, if the current coding unit CU ispartitioned into a first prediction block PU1 and a second predictionblock PU2 on left and right sides, and the current prediction block isthe second prediction block PU2, the available neighboring blocks of thePU2 include: neighboring block A0, neighboring block B0, neighboringblock B1, and neighboring block B2 of the second prediction block PU2.At this time, the neighboring block A1 is located inside the currentcoding unit CU, and does not act as the available neighboring block ofthe second prediction block PU2.

Further, the available neighboring blocks may be determined by usingflag bits of the neighboring blocks. The flag bits may, but are notlimited to, be used to identify that the neighboring blocks are notlocated inside the CU.

A method for determining the available neighboring blocks by using theflag bit(s) of the neighboring blocks is not limited in this embodiment,and is a technology well known by a person skilled in the art, so thatdetails will not be described herein again.

303: Obtain motion vector predictors from the available neighboringblocks in a preset sequence according to motion vector predictors of theavailable neighboring blocks, and add the obtained motion vectorpredictors to the motion vector list.

Further, the obtaining motion vector predictors from the availableneighboring blocks in a preset sequence may include, if the availableneighboring blocks are interframe coding blocks, obtaining the motionvector predictors from the available neighboring blocks in a sequence ofthe neighboring block A1, the neighboring block B1, the neighboringblock B0, the neighboring block A0, and the neighboring block B2.

Specifically, if the available neighboring blocks are interframe codingblocks, it indicates that the neighboring blocks include motion vectorinformation, and the motion vector predictors are obtained from theneighboring blocks.

Specifically, if the available neighboring blocks of the predictionblock include the neighboring block A0, the neighboring block A1, theneighboring block B0, and the neighboring block B2 of the secondprediction block, the motion vector predictors are obtained from theneighboring block A0, the neighboring block A1, the neighboring blockB0, and the neighboring block B2 in a sequence of the neighboring blockA0, the neighboring block A1, the neighboring block B0, and theneighboring block B2. In view of the above, when the current CU ispartitioned into the first and the second prediction blocks on top andbottom sides, the available neighboring blocks of the second predictionblock do not include the neighboring block B1 located inside the firstprediction block. Therefore, the motion vector predictor from B1 is notobtained.

If the available neighboring blocks of the prediction block include: theneighboring block A0, the neighboring block B0, the neighboring blockB1, and the neighboring block B2 of the second prediction block PU2, themotion vector predictors are obtained from the neighboring block A0, theneighboring block B0, the neighboring block B1, and the neighboringblock B2 in a sequence of the neighboring block A0, the neighboringblock B0, the neighboring block B1, and the neighboring block B2. Inview of the above, when the current CU is partitioned into the first andthe second prediction blocks on left and right sides, the availableneighboring blocks of the second prediction block do not include theneighboring block A1 located inside the first prediction block.Therefore, the motion vector predictor from the A1 is not obtained.

Further, if the obtained motion vector predictor is a motion vectorpredictor of a current available neighboring block, the adding theobtained motion vector predictors to the motion vector list includesdetermining whether the motion vector predictor of the current availableneighboring block is the same as motion vector predictors of otheravailable neighboring blocks except the current available neighboringblock; and if not, adding the motion vector predictor of the currentavailable neighboring block to the motion vector list.

In view of the above, during the above process, since the availableneighboring blocks do not include the neighboring block located insidethe current CU, multiple PUs of the CU have no dependency, and may beexecuted in parallel. For example, when the current CU is partitionedinto the first and the second prediction blocks on left and right sides,the available neighboring blocks of the second prediction block do notinclude the neighboring block A1 located inside the first predictionblock, and the motion vector predictor of the A1 is not involved in thedetermination process. Therefore, the second prediction block and thefirst prediction block may execute the process in parallel.

Specifically, as an implementation manner of the embodiment, if thecurrent available neighboring block is the neighboring block B1, it isdetermined whether a motion vector predictor of the neighboring block B1is the same as a motion vector predictor of the neighboring block A1; ifthe current available neighboring block is the neighboring block B0, itis determined whether a motion vector predictor of the neighboring blockB0 is the same as the motion vector predictor of the neighboring blockB1; if the current available neighboring block is the neighboring blockA0, it is determined whether a motion vector predictor of theneighboring block A0 is the same as the motion vector predictor of theneighboring block A1; and if the current available neighboring block isthe neighboring block B2, it is determined whether a motion vectorpredictor of the neighboring block B2 is the same as at least one of themotion vector predictor of the neighboring block A1 and the motionvector predictor of the neighboring block B1.

Further, if the obtained motion vector predictor is a motion vectorpredictor of a current available neighboring block, the adding theobtained motion vector predictors to the motion vector list may furtherinclude determining whether the motion vector predictor of the currentavailable neighboring block is the same as motion vector predictors thathave been added to the motion vector list; and if not, adding the motionvector predictor of the current available neighboring block to themotion vector list.

Specifically, as an implementation manner of the embodiment, if thecurrent available neighboring block is the neighboring block B1, it isdetermined whether the motion vector predictor of the neighboring blockB1 is the same as the motion vector predictor, of the neighboring blockA1 that has been added to the motion vector list; if the currentavailable neighboring block is the neighboring block B0, it isdetermined whether the motion vector predictor of the neighboring blockB0 is the same as the motion vector predictor, of the neighboring blockB1 that has been added to the motion vector list; if the currentavailable neighboring block is the neighboring block A0, it isdetermined whether the motion vector predictor of the neighboring blockA0 is the same as the motion vector predictor, of the neighboring blockA1 that has been added to the motion vector list; and if the currentavailable neighboring block is the neighboring block B2, it isdetermined whether the motion vector predictor of the neighboring blockB2 is the same as at least one of the motion vector predictor, of theneighboring block A1 that has been added to the motion vector list andthe motion vector predictor, of the neighboring block B1 that has beenadded to the motion vector list.

Further, a TMVP may further be considered during the build-up of themotion vector list.

As an implementation manner of the embodiment, the obtaining motionvector predictors from the available neighboring blocks in a presetsequence may further be obtaining motion vector predictors from theavailable neighboring blocks and/or the TMVP in a sequence of theneighboring block A1, the neighboring block B1, the neighboring blockB0, the neighboring block A0, the neighboring block B2, and the TMVP.

In order to describe the solution of the present invention more clearly,the method for building the motion vector list for the CU with differentpartition manners are specifically described below.

1. The CU is Partitioned into a PU1 and a PU2 on Left and Right Sides

(1) Build a Motion Vector List of the PU1

1) Obtain motion vector predictors from the neighboring block A1, theneighboring block B1, the neighboring block B0, the neighboring blockA0, and the neighboring block B2 in a sequence of the neighboring blockA1, the neighboring block B1, the neighboring block B0, the neighboringblock A0, and the neighboring block B2, and add them to the motionvector list.

a. When the current neighboring block is the neighboring block A1, andonly when the neighboring block A1 includes a motion vector predictor,add the motion vector predictor of the neighboring block A1 to themotion vector list; b. when the current neighboring block is theneighboring block B1, and only when the neighboring block B1 includes amotion vector predictor, and the predictor is different from the motionvector predictor, of the neighboring block A1 that has been added to themotion vector list, add the motion vector predictor of the neighboringblock B1 to the motion vector list; c. when the current neighboringblock is the neighboring block B0, and only when the neighboring blockB0 includes a motion vector predictor, and the predictor is differentfrom the motion vector predictor, of the neighboring block B1 that hasbeen added to the motion vector list, add the motion vector predictor ofthe neighboring block B0 to the motion vector list; d. when the currentneighboring block is the neighboring block A0, and only when theneighboring block A0 includes a motion vector predictor, and thepredictor is different from the motion vector predictor, of theneighboring block A1 that has been added to the motion vector list, addthe motion vector predictor of the neighboring block A0 to the motionvector list; and e. when the current neighboring block is theneighboring block B2, and only when the neighboring block B2 includes amotion vector predictor, the predictor is different from both the motionvector predictor, of the neighboring block A1 that has been added to themotion vector list, and the motion vector predictor, of the neighboringblock B1 that has been added to the motion vector list, and the motionvector predictor of at least one of the neighboring block A1, theneighboring block B1, the neighboring block B0, and the neighboringblock A0 has not been added to the motion vector list, add the motionvector predictor of the neighboring block B2 to the motion vector list.

2) Obtain the TMVP, and add it to the motion vector list. Specifically,the TMVP of the PU1 is obtained by using a temporal reference image ofthe PU1, and if the TMVP of the PU1 is available, the TMVP is added tothe motion vector list.

(2) Build a Motion Vector List of the PU2

1) Obtain motion vector predictors from the neighboring block B1, theneighboring block B0, the neighboring block A0, and the neighboringblock B2 in a sequence of the neighboring block B1, the neighboringblock B0, the neighboring block A0, and the neighboring block B2, andadd them to the motion vector list.

a. When the current neighboring block is the neighboring block B1, andonly when the neighboring block B1 includes a motion vector predictor,add the motion vector predictor of the neighboring block B1 to themotion vector list; b. when the current neighboring block is theneighboring block B0, and only when the neighboring block B0 includes amotion vector predictor, and the prediction value is different from themotion vector predictor, of the neighboring block B1 that has been addedto the motion vector list, add the motion vector predictor of theneighboring block B0 to the motion vector list; c. when the currentneighboring block is the neighboring block A0, and only when theneighboring block A0 includes a motion vector predictor, add the motionvector predictor of the neighboring block A0 to the motion vector list;and d. when the current neighboring block is the neighboring block B2,and only when the neighboring block B2 includes a motion vectorpredictor, and the predictor is different from the motion vectorpredictor, of the neighboring block B1 that has been added to the motionvector list, add the motion vector predictor of the neighboring block B2to the motion vector list.

2) Obtain the TMVP, and add it to the motion vector list. Specifically,the TMVP of the PU1 is obtained by using a temporal reference image ofthe PU1, and if the TMVP of the PU1 is available, the TMVP is added tothe motion vector list.

At this time, since when the motion vector list of the PU2 is built, theneighboring block A1 of the PU2 is not considered, the motion vectorlists of the PU1 and the PU2 may be built in a parallel manner.

2. The CU is Partitioned into a PU1 and a PU2 on Top and Bottom Sides

(1) Build a Motion Vector List of the PU1

This is similar to the method of “(1) Build a motion vector list of thePU1” in “1. The CU is partitioned into a PU1 and a PU2 on left and rightsides”, so the details will not be described herein again.

(2) Build a Motion Vector List of the PU2

1) Obtain motion vector predictors from the neighboring block B1, theneighboring block B0, the neighboring block A0, and the neighboringblock B2 in a sequence of the neighboring block B1, the neighboringblock B0, the neighboring block A0, and the neighboring block B2, andadd them to the motion vector list.

a. When the current neighboring block is the neighboring block A1, andonly when the neighboring block A1 includes a motion vector predictor,add the motion vector predictor of the neighboring block A1 to themotion vector list; b. when the current neighboring block is theneighboring block B0, and only when the neighboring block B0 includes amotion vector predictor, add the motion vector predictor of theneighboring block B0 to the motion vector list; c. when the currentneighboring block is the neighboring block A0, and only when theneighboring block A0 includes a motion vector predictor, and thepredictor is different from the motion vector predictor, of theneighboring block A1 that has been added to the motion vector list, addthe motion vector predictor of the neighboring block A0 to the motionvector list; and d. when the current neighboring block is theneighboring block B2, and only when the neighboring block B2 includes amotion vector predictor, and the predictor is different from the motionvector predictor, of the neighboring block A1 that has been added to themotion vector list, add the motion vector predictor of the neighboringblock B2 to the motion vector list.

2) Obtain the TMVP, and add it to the motion vector list. Specifically,the TMVP of the PU1 is obtained by using a temporal reference image ofthe PU1, and if the TMVP of the PU1 is available, the TMVP is added tothe motion vector list.

At this time, since when the motion vector list of the PU2 is built, theneighboring block B1 of the PU2 is not considered, the motion vectorlists of the PU1 and the PU2 may be built in a parallel manner.

Through the above solution, when a motion vector list of a predictionblock is built, spatial neighboring blocks of the current predictionblock are obtained firstly, where the current prediction block islocated inside a current coding unit; available neighboring blocks ofthe current prediction block are determined according to a partitionmanner of the current coding unit, where the available neighboringblocks are located outside the current coding unit; and motion vectorpredictors are obtained from the available neighboring blocks in apreset sequence according to motion vector predictors of the availableneighboring blocks, and the obtained motion vector predictors are addedto the motion vector list. In this way, when the motion vector list ofthe prediction block is built, no neighboring block located inside thecurrent coding unit is considered. When the coding unit includes atleast two prediction blocks, motion vector lists of the at least twoprediction blocks may be built in a parallel manner, which increases thespeed of building the motion vector lists of the at least two predictionblocks in the same coding unit, and improves the parallel processingcapability.

Some apparatus embodiments are provided below, and the providedapparatus embodiments respectively correspond to the above methodembodiments. Refer to the method embodiments for specific implementationmanners of the apparatus and a receiver and a processor included in theapparatus.

An apparatus for building a motion vector list for motion vectorprediction is provided in an embodiment. As shown in FIG. 4, theapparatus may include: a receiver 41 configured to obtain spatialneighboring blocks of a current prediction block, where the currentprediction block is located inside a current coding unit; and aprocessor 42 configured to determine available neighboring blocks of thecurrent prediction block according to a partition manner of the currentcoding unit, where the available neighboring blocks are located outsidethe current coding unit; and obtain motion vector predictors from theavailable neighboring blocks in a preset sequence according to motionvector predictors of the available neighboring blocks, and add theobtained motion vector predictors to the motion vector list.

Further, the spatial neighboring blocks of the prediction block obtainedby the receiver 41 include a neighboring block A0 located at abottom-left side of the prediction block, a neighboring block A1 locatedat a left side of the prediction block, a neighboring block B0 at atop-right side of the prediction block, a neighboring block B1 at a topside of the prediction block, and a neighboring block B2 at a top-leftside of the prediction block.

Further, the processor 42 is further configured to, if the currentcoding unit is partitioned into a first prediction block and a secondprediction block on top and bottom sides, and the current predictionblock is the second prediction block, the available neighboring blocksof the prediction block include the neighboring block A0, theneighboring block A1, the neighboring block B0, and the neighboringblock B2 of the second prediction block; and if the current coding unitis partitioned into a first prediction block and a second predictionblock on left and right sides, and the current prediction block is thesecond prediction block, the available neighboring blocks of theprediction block include the neighboring block A0, the neighboring blockB0, the neighboring block B1, and the neighboring block B2 of the secondprediction block.

The processor 42 is further configured to, if the available neighboringblocks are interframe coding blocks, obtain the motion vector predictorsfrom the available neighboring blocks in a sequence of the neighboringblock A1, the neighboring block B1, the neighboring block B0, theneighboring block A0, and the neighboring block B2.

The processor 42 is further configured to determine whether a motionvector predictor of a current available neighboring block is the same asmotion vector predictors of other available neighboring blocks exceptthe current available neighboring block; and if not, add the motionvector predictor of the current available neighboring block to themotion vector list.

The processor 42 is further configured to determine whether a motionvector predictor of a current available neighboring block is the same asmotion vector predictors that have been added to the motion vector list;and if not, add the motion vector predictor of the current availableneighboring block to the motion vector list.

The processor 42 is further configured to, if the current availableneighboring block is the neighboring block B1, determine whether amotion vector predictor of the neighboring block B1 is the same as amotion vector predictor of the neighboring block A1; if the currentavailable neighboring block is the neighboring block B0, determinewhether a motion vector predictor of the neighboring block B0 is thesame as the motion vector predictor of the neighboring block B1; if thecurrent available neighboring block is the neighboring block A0,determine whether a motion vector predictor of the neighboring block A0is the same as the motion vector predictor of the neighboring block A1;and if the current available neighboring block is the neighboring blockB2, determine whether a motion vector predictor of the neighboring blockB2 is the same as at least one of the motion vector predictor of theneighboring block A1 and the motion vector predictor of the neighboringblock B1.

The processor 42 is further configured to, if the current availableneighboring block is the neighboring block B1, determine whether amotion vector predictor of the neighboring block B1 is the same as amotion vector predictor of the neighboring block A1 that has been addedto the motion vector list; if the current available neighboring block isthe neighboring block B0, determine whether a motion vector predictor ofthe neighboring block B0 is the same as the motion vector predictor ofthe neighboring block B1 that has been added to the motion vector list;if the current available neighboring block is the neighboring block A0,determine whether a motion vector predictor of the neighboring block A0is the same as the motion vector predictor of the neighboring block A1that has been added to the motion vector list; and if the currentavailable neighboring block is the neighboring block B2, determinewhether a motion vector predictor of the neighboring block B2 is thesame as at least one of the motion vector predictor of the neighboringblock A1 that has been added to the motion vector list and the motionvector predictor of the neighboring block B1 that has been added to themotion vector list.

Through the above solution, when a motion vector list of a predictionblock is built, the receiver obtains spatial neighboring blocks of thecurrent prediction block first, where the current prediction block islocated inside a current coding unit; and the processor determinesavailable neighboring blocks of the current prediction block accordingto a partition manner of the current coding unit, where the availableneighboring blocks are located outside the current coding unit; andobtains the motion vector predictors from the available neighboringblocks in a preset sequence according to motion vector predictors of theavailable neighboring blocks, and adds the obtained motion vectorpredictors to the motion vector list. In this way, when the motionvector list of the prediction block is built, no neighboring blocklocated inside the current coding unit is considered. When the codingunit includes at least two prediction blocks, motion vector lists of theat least two prediction blocks may be built in a parallel manner, whichincreases the speed of building the motion vector lists of the at leasttwo prediction blocks in the same coding unit, and improves the parallelprocessing capability.

Through the foregoing description of the embodiments, a person skilledin the art may clearly understand that the present invention may beimplemented by software in addition to necessary universal hardware, anddefinitely may also be implemented by hardware. However, under mostcircumstances, the former is preferred. Based on such an understanding,the technical solutions of the present invention essentially, or thepart contributing to the prior art may be implemented in the form of asoftware product. The computer software product is stored in a readablestorage medium, for example, a floppy disc, a hard disk, or an opticaldisc of a computer, and includes several instructions for instructing acomputer device (which may be a personal computer, a server, or anetwork device) to perform the methods described in the embodiments ofthe present invention.

The foregoing descriptions are merely specific embodiments of thepresent invention, but are not intended to limit the protection scope ofthe present invention. Any variation or replacement readily figured outby a person skilled in the art within the technical scope disclosed inthe present invention shall fall within the protection scope of thepresent invention. Therefore, the protection scope of the presentinvention shall be subject to the appended claims.

What is claimed is:
 1. A method for building, by a coder, a motionvector list for motion vector prediction, comprising: obtaining spatialneighboring blocks of a current prediction block, wherein the currentprediction block to be predicated using the motion vector list islocated inside a current coding unit; determining available neighboringblocks of the current prediction block according to a partition mannerof the current coding unit when one of the spatial neighboring blocks ofthe current prediction block is located inside the current coding unit,wherein the available neighboring blocks are located outside the currentcoding unit; obtaining a plurality of motion vector predictors from theavailable neighboring blocks in a preset sequence according to themotion vector predictors of the available neighboring blocks; and addingthe obtained motion vector predictors to the motion vector list whilecomparing at least a pair of the motion vector predictors of theavailable neighboring blocks to exclude one of the pair of the motionvector predictors of the available neighboring blocks from the motionvector list when the pair of the motion vector predictors are the same,wherein the at least a pair of motion vector predictors belong to twoavailable neighboring blocks which are located on the same side of thecurrent prediction block.
 2. The method for building a motion vectorlist for motion vector prediction according to claim 1, wherein thespatial neighboring blocks of the prediction block comprise a firstneighboring block located at a bottom-left side of the prediction block,a second neighboring block located at a left side of the predictionblock, a third neighboring block located at a top-right side of theprediction block, a fourth neighboring block located at a top side ofthe prediction block, and a fifth neighboring block located at atop-left side of the prediction block.
 3. The method for building amotion vector list for motion vector prediction according to claim 2,either wherein the current coding unit is partitioned into a firstprediction block and a second prediction block on top and bottom sides,wherein the current prediction block is the second prediction block, andwherein the available neighboring blocks of the prediction blockcomprise the first neighboring block, the second neighboring block, thethird neighboring block, and the fifth neighboring block of the secondprediction block, or wherein the current coding unit is partitioned intoa first prediction block and a second prediction block on left and rightsides, wherein the current prediction block is the second predictionblock, and wherein the available neighboring blocks of the predictionblock comprise the first neighboring block, the third neighboring block,the fourth neighboring block, and the fifth neighboring block of thesecond prediction block.
 4. The method for building a motion vector listfor motion vector prediction according to claim 2, wherein the availableneighboring blocks are interframe coding blocks, and wherein obtainingthe motion vector predictors from the available neighboring blocks inthe preset sequence comprises obtaining the motion vector predictorsfrom the available neighboring blocks in a sequence of the secondneighboring block, the fourth neighboring block, the third neighboringblock, the first neighboring block, and the fifth neighboring block. 5.The method for building a motion vector list for motion vectorprediction according to claim 3, wherein the available neighboringblocks are interframe coding blocks, and wherein obtaining the motionvector predictors from the available neighboring blocks in the presetsequence comprises obtaining the motion vector predictors from theavailable neighboring blocks in a sequence of the second neighboringblock, the fourth neighboring block, the third neighboring block, thefirst neighboring block, and the fifth neighboring block.
 6. The methodfor building a motion vector list for motion vector prediction accordingto claim 4, wherein the obtained motion vector predictor is a motionvector predictor of a current available neighboring block, and whereinadding the obtained motion vector predictors to the motion vector listwhile comparing the at least a pair of the motion vector predictors ofthe available neighboring blocks to exclude the one of the pair of themotion vector predictors of the available neighboring blocks from themotion vector list when the pair of the motion vector predictors are thesame comprises: determining whether the motion vector predictor of thecurrent available neighboring block is the same as the motion vectorpredictors of other available neighboring blocks that are not thecurrent available neighboring block; and adding the motion vectorpredictor of the current available neighboring block to the motionvector list when the motion vector predictor of the current availableneighboring block is not the same as motion vector predictors of otheravailable neighboring blocks that are not the current availableneighboring block.
 7. The method for building a motion vector list formotion vector prediction according to claim 5, wherein the obtainedmotion vector predictor is a motion vector predictor of a currentavailable neighboring block, and wherein adding the obtained motionvector predictors to the motion vector list while comparing the at leasta pair of the motion vector predictors of the available neighboringblocks to exclude the one of the pair of the motion vector predictors ofthe available neighboring blocks from the motion vector list when thepair of the motion vector predictors are the same comprises: determiningwhether the motion vector predictor of the current available neighboringblock is the same as motion vector predictors of other availableneighboring blocks that are not the current available neighboring block;and adding the motion vector predictor of the current availableneighboring block to the motion vector list when the motion vectorpredictor of the current available neighboring block is not the same asmotion vector predictors of other available neighboring blocks that arenot the current available neighboring block.
 8. The method for buildinga motion vector list for motion vector prediction according to claim 4,wherein the obtained motion on vector predictor is a motion vectorpredictor of a current available neighboring block, and wherein theadding the obtained motion vector predictors to the motion vector listwhile comparing the at least a pair of the motion vector predictors ofthe available neighboring blocks to exclude the one of the pair of themotion vector predictors of the available neighboring blocks from themotion vector list when the pair of the motion vector predictors are thesame comprises: determining whether the motion vector predictor of thecurrent available neighboring block is the same as motion vectorpredictors that have been added to the motion vector list; and addingthe motion vector predictor of the current available neighboring blockto the motion vector list when the motion vector predictor of thecurrent available neighboring block is not the same as motion vectorpredictors that have been added to the motion vector list.
 9. The methodfor building a motion vector list for motion vector prediction accordingto claim 5, wherein the obtained motion vector predictor is a motionvector predictor of a current available neighboring block, and whereinthe adding the obtained motion vector predictors to the motion vectorlist while comparing the at least a pair of the motion vector predictorsof the available neighboring blocks to exclude the one of the pair ofthe motion vector predictors of the available neighboring blocks fromthe motion vector list when the pair of the motion vector predictors arethe same comprises: determining whether the motion vector predictor ofthe current available neighboring block is the same as motion vectorpredictors that have been added to the motion vector list; and addingthe motion vector predictor of the current available neighboring blockto the motion vector list when the motion vector predictor of thecurrent available neighboring block is not the same as motion vectorpredictors that have been added to the motion vector list.
 10. Themethod for building a motion vector list for motion vector predictionaccording to claim 6, wherein determining whether the motion vectorpredictor of the current available neighboring block is the same asmotion vector predictors of other available neighboring blocks that arenot the current available neighboring block comprises; determiningwhether the motion vector predictor of the fourth neighboring block isthe same as a motion vector predictor of the second neighboring blockwhen the current available neighboring block is the fourth neighboringblock; determining whether the motion vector predictor of the thirdneighboring block is the same as the motion vector predictor of thefourth neighboring block when the current available neighboring block isthe third neighboring block; determining whether the motion vectorpredictor of the first neighboring block is the same as the motionvector predictor of the second neighboring block when the currentavailable neighboring block is the first neighboring block; anddetermining whether the motion vector predictor of the fifth neighboringblock is the same as at least one of the motion vector predictor of thesecond neighboring block and the motion vector predictor of the fourthneighboring block when that the current available neighboring block isthe fifth neighboring block.
 11. The method for building a motion vectorlist for motion vector prediction according to claim 7, whereindetermining whether the motion vector predictor of the current availableneighboring block is the same as motion vector predictors of otheravailable neighboring blocks that are not the current availableneighboring block comprises: determining whether the motion vectorpredictor of the fourth neighboring block is the same as a motion vectorpredictor of the second neighboring block when the current availableneighboring block is the fourth neighboring block; determining whetherthe motion vector predictor of the third neighboring block is the sameas the motion vector predictor of the fourth neighboring block when thecurrent available neighboring block is the third neighboring block;determining whether the motion vector predictor of the first neighboringblock is the same as the motion vector predictor of the secondneighboring block when the current available neighboring block is thefirst neighboring block; and determining whether the motion vectorpredictor of the fifth neighboring block is the same as at least one ofthe motion vector predictor of the second neighboring block and themotion vector predictor of the fourth neighboring block when the currentavailable neighboring block is the fifth neighboring block.
 12. Themethod for building a motion vector list for motion vector predictionaccording to claim 8, wherein determining whether the motion vectorpredictor of the current available neighboring block is the same as themotion vector predictors that have been added to the motion vector listcomprises: determining whether the motion vector predictor of the fourthneighboring block is the same as a motion vector predictor of the secondneighboring block that has been added to the motion vector list when thecurrent available neighboring block is the fourth neighboring block;determining whether the motion vector predictor of the third neighboringblock is the same as the motion vector predictor of the fourthneighboring block that has been added to the motion vector list when thecurrent available neighboring block is the third neighboring block;determining whether the motion vector predictor of the first neighboringblock is the same as the motion vector predictor of the secondneighboring block that has been added to the motion vector list when thecurrent available neighboring block is the first neighboring block; anddetermining whether the motion vector predictor of the fifth neighboringblock is the same as at least one of the motion vector predictor of thesecond neighboring block that has been added to the motion vector listand the motion vector predictor of the fourth neighboring block that hasbeen added to the motion vector list when the current availableneighboring block is the fifth neighboring block.
 13. The method forbuilding a motion vector list for motion vector prediction according toclaim 9, wherein determining whether the motion vector predictor of thecurrent available neighboring block is the same as the motion vectorpredictors that have been added to the motion vector list comprises:determining whether the motion vector predictor of the fourthneighboring block is the same as a motion vector predictor of the secondneighboring block that has been added to the motion vector list when thecurrent available neighboring block is the fourth neighboring block;determining whether the motion vector predictor of the third neighboringblock is the same as the motion vector predictor of the fourthneighboring block that has been added to the motion vector list when thecurrent available neighboring block is the third neighboring block;determining whether the motion vector predictor of the first neighboringblock is the same as the motion vector predictor of the secondneighboring block that has been added to the motion vector list when thecurrent available neighboring block is the first neighboring block; anddetermining whether the motion vector predictor of the fifth neighboringblock is the same as at least one of the motion vector predictor of thesecond neighboring block that has been added to the motion vector listand the motion vector predictor of the fourth neighboring block that hasbeen added to the motion vector list when the current availableneighboring block is the fifth neighboring block.
 14. An apparatus forbuilding a motion vector list for motion vector prediction, comprising:a receiver configured to obtain spatial neighboring blocks of a currentprediction block using the predefined position relationship between thespatial neighboring blocks and the current prediction blocks, whereinthe current prediction block to be predicated using the motion vectorlist is located inside a current coding unit; and a processor programmedto: determine available neighboring blocks of the current predictionblock according to a partition manner of the current coding unit whenone of the spatial neighboring blocks of the current prediction block islocated inside the current coding unit, wherein the availableneighboring blocks are located outside the current coding unit; obtainmotion vector predictors from the available neighboring blocks in apreset sequence according to motion vector predictors of the availableneighboring blocks; and add the obtained motion vector predictors to themotion vector list while comparing at least a pair of the motion vectorpredictors of the available neighboring blocks to exclude one of thepair of the motion vector predictors of the available neighboring blocksfrom the motion vector list when the pair of the motion vectorpredictors are the same, wherein the at least a pair of motion vectorpredictors belong to two available neighboring blocks which are locatedon the same side of the current prediction block.
 15. The apparatus forbuilding a motion vector list for motion vector prediction according toclaim 14, wherein the spatial neighboring blocks of the prediction blockobtained by the receiver comprise a first neighboring block located at abottom-left side of the prediction block, a second neighboring blocklocated at a left side of the prediction block, a third neighboringblock located at a top-right side of the prediction block, a fourthneighboring block located at a top side of the prediction block, and afifth neighboring block located at a top-left side of the predictionblock.
 16. The apparatus for building a motion vector list for motionvector prediction according to claim 15, either wherein the currentcoding unit is partitioned into a first prediction block and a secondprediction block on top and bottom sides, wherein the current predictionblock is the second prediction block, and wherein the availableneighboring blocks of the prediction block comprise the firstneighboring block, the second neighboring block, the third neighboringblock, and the fifth neighboring block of the second prediction block;or wherein the current coding unit is partitioned into a firstprediction block and a second prediction block on left and right sides,wherein the current prediction block is the second prediction block, andwherein the available neighboring blocks of the prediction blockcomprise the first neighboring block, the third neighboring block, thefourth neighboring block, and the fifth neighboring block of the secondprediction block.
 17. The apparatus for building a motion vector listfor motion vector prediction according to claim 15, wherein theavailable neighboring blocks are interframe coding blocks, and whereinthe processor is further configured to obtain the motion vectorpredictors from the available neighboring blocks in a sequence of thesecond neighboring block, the fourth neighboring block, the thirdneighboring block, the first neighboring block, and the fifthneighboring block.
 18. The apparatus for building a motion vector listfor motion vector prediction according to claim 16, wherein theavailable neighboring blocks are interframe coding blocks, and whereinthe processor is further configured to obtain the motion vectorpredictors from the available neighboring blocks in a sequence of thesecond neighboring block, the fourth neighboring block, the thirdneighboring block, the first neighboring block, and the fifthneighboring block.
 19. The apparatus for building a motion vector listfor motion vector prediction according to claim 17, wherein theprocessor is further configured to: determine whether a motion rectorpredictor of a current available neighboring block is the same as motionvector predictors of other available neighboring blocks that are not thecurrent available neighboring block when the obtained motion vectorpredictor is a motion vector predictor of a current availableneighboring block; and add the motion vector predictor of the currentavailable neighboring block to the motion vector list when the motionvector predictor of the current available neighboring block is not thesame as motion vector predictors of other available neighboring blocksthat are not the current available neighboring block.
 20. The apparatusfor building a motion vector list for motion vector prediction accordingto claim 18, wherein the processor is further configured to: determinewhether a motion vector predictor of a current available neighboringblock is the same as motion vector predictors of other availableneighboring blocks that are not the current available neighboring blockwhen the obtained motion vector predictor is a motion vector predictorof a current available neighboring block; and add the motion vectorpredictor of the current available neighboring block to the motionvector list when the motion vector predictor of a current availableneighboring block is not the same as motion vector predictors of otheravailable neighboring blocks that are not the current availableneighboring block.
 21. The apparatus for building a motion vector listfor motion vector prediction according to claim 17, wherein theprocessor is further configured to: determine whether a motion vectorpredictor of a current available neighboring block is the same as motionvector predictors that have been added to the motion vector list whenthe obtained motion vector predictor is a motion vector predictor of acurrent available neighboring block; and add the motion vector predictorof the current available neighboring block to the motion vector listwhen the motion vector predictor of the current available neighboringblock is not the same as motion vector predictors that have been addedto the motion vector list.
 22. The apparatus for building a motionvector list for motion vector prediction according to claim 18, whereinthe processor is further configured to; determine whether a motionvector predictor of a current available neighboring block is the same asmotion vector predictors that have been added to the motion vector listwhen the obtained motion vector predictor is the motion vector predictorof a current available neighboring block; and add the motion vectorpredictor of the current available neighboring block to the motionvector list when the motion vector predictor of the current availableneighboring block is not the same as motion vector predictors that havebeen added to the motion vector list.
 23. The apparatus for building amotion vector list for motion vector prediction according to claim 19,wherein the current available neighboring block is the fourthneighboring block, and wherein when the processor is configured todetermine whether the motion vector predictor of the fourth neighboringblock is the same as the motion vector predictor of the secondneighboring block, the processor is configured to: determine whether amotion vector predictor of the third neighboring block is the same asthe motion vector predictor of the fourth neighboring block when thecurrent available neighboring block is the third neighboring block;determine whether a motion vector predictor of the first neighboringblock is the same as the motion vector predictor of the secondneighboring block when the current available neighboring block is thefirst neighboring block; and determine whether a motion vector predictorof the fifth neighboring block is the same as at least one of the motionvector predictor of the second neighboring block and the motion vectorpredictor of the fourth neighboring block when the current availableneighboring block is the fifth neighboring block.
 24. The apparatus forbuilding a motion vector list for motion vector prediction according toclaim 20, wherein the current available neighboring block is the fourthneighboring block, and wherein when the processor is configured todetermine whether the motion vector predictor of the fourth neighboringblock is the same as the motion vector predictor of the secondneighboring block, the processor is configured to: determine whether amotion vector predictor of the third neighboring block is the same asthe motion vector predictor of the fourth neighboring block when thecurrent available neighboring block is the third neighboring block;determine whether a motion vector predictor of the first neighboringblock is the same as the motion vector predictor of the secondneighboring block when the current available neighboring block is thefirst neighboring block; and determine whether a motion vector predictorof the fifth neighboring block is the same as at least one of the motionvector predictor of the second neighboring block and the motion vectorpredictor of the fourth neighboring block when the current availableneighboring block is the fifth neighboring block.
 25. The apparatus forbuilding a motion vector list for motion vector prediction according toclaim 21, wherein the current available neighboring block is the fourthneighboring block, and wherein when the processor is configured todetermine whether the motion vector predictor of the fourth neighboringblock is the same as the motion vector predictor of the secondneighboring block that has been added to the motion vector list, theprocessor is configured to: determine whether a motion vector predictorof the third neighboring block is the same as the motion vectorpredictor of the fourth neighboring block that has been added to themotion vector list when the current available neighboring block is thethird neighboring block; determine whether a motion vector predictor ofthe first neighboring block is the same as the motion vector predictorof the second neighboring block that has been added to the motion vectorlist when the current available neighboring block is the firstneighboring block; and determine whether a motion vector predictor ofthe fifth neighboring block is the same as at least one of the motionvector predictor of the second neighboring block that has been added tothe motion vector list and the motion vector predictor of the fourthneighboring block that has been added to the motion vector list when thecurrent available neighboring block is the fifth neighboring block. 26.The apparatus for building a motion vector list for motion vectorprediction according to claim 22, wherein the current availableneighboring block is the fourth neighboring block, and wherein when theprocessor is configured to determine whether the motion vector predictorof the fourth neighboring block is the same as the motion vectorpredictor of the second neighboring block that has been added to themotion vector list, the processor is configured to: determine whether amotion vector predictor of the third neighboring block is the same asthe motion vector predictor of the fourth neighboring block that hasbeen added to the motion vector list when the current availableneighboring block is the third neighboring block; determine whether amotion vector predictor of the first neighboring block is the same asthe motion vector predictor of the second neighboring block that hasbeen added to the motion vector list when the current availableneighboring block is the first neighboring block; and determine whethera motion vector predictor of the fifth neighboring block is the same asat least one of the motion vector predictor of the second neighboringblock that has been added to the motion vector list and the motionvector predictor of the fourth neighboring block that has been added tothe motion vector list when the current available neighboring block isthe fifth neighboring block.
 27. A method for building, by a hardware, amotion vector list for motion vector prediction, comprising: obtainingspatial neighboring blocks of a current prediction block, wherein thecurrent prediction block to be predicated using the motion vector listis located inside a current coding unit, wherein the spatial neighboringblocks of the prediction block comprise a first neighboring blocklocated at a bottom-left side of the prediction block, a secondneighboring block located at a left side of the prediction block, athird neighboring block located at a top-right side of the predictionblock, a fourth neighboring block located at a top side of theprediction block, and a fifth neighboring block located at a top-leftside of the prediction block; determining available neighboring blocksof the current prediction block according to a partition manner of thecurrent coding unit, wherein the available neighboring blocks arelocated outside the current coding unit, and either wherein the currentcoding unit is partitioned into a first prediction block and a secondprediction block on top and bottom sides, wherein the current predictionblock is the second prediction block, and wherein the availableneighboring blocks of the prediction block comprise the firstneighboring block, the second neighboring block, the third neighboringblock, and the fifth neighboring block of the second prediction block,or wherein the current coding unit is partitioned into a firstprediction block and a second prediction block on left and right sides,wherein the current prediction block is the second prediction block, andwherein the available neighboring blocks of the prediction blockcomprise the first neighboring block, the third neighboring block, thefourth neighboring block, and the fifth neighboring block of the secondprediction block; obtaining a plurality of motion vector predictors fromthe available neighboring blocks in a preset sequence according to themotion vector predictors of the available neighboring blocks, when thecurrent coding unit is partitioned into a first prediction block and asecond prediction block on left and right sides and when the currentprediction block is the second prediction block: adding the motionvector predictor of the fourth neighboring block to the motion vectorlist when the current neighboring block is the fourth neighboring blockand only when the fourth neighboring block includes a motion vectorpredictor; adding the motion vector predictor of the third neighboringblock to the motion vector list when the current neighboring block isthe third neighboring block, only when the third neighboring blockincludes a motion vector predictor, and when the prediction value isdifferent from the motion vector predictor of the fourth neighboringblock that has been added to the motion vector list; adding the motionvector predictor of the first neighboring block to the motion vectorlist when the current neighboring block is the first neighboring blockand only when the first neighboring block includes a motion vectorpredictor; adding the motion vector predictor of the fifth neighboringblock to the motion vector list when the current neighboring block isthe fifth neighboring block, only when the fifth neighboring blockincludes a motion vector predictor; and add the motion vector predictorof the fifth neighboring block to the motion vector list when thepredictor is different from the motion vector predictor of the fourthneighboring block that has been added to the motion vector list, or whenthe current coding unit is partitioned into a first prediction block anda second prediction block on top and bottom sides and when the currentprediction block is the second prediction block: adding the motionvector predictor of the second neighboring block to the motion vectorlist when the current neighboring block is the second neighboring blockand only when the second neighboring block includes a motion vectorpredictor; adding the motion vector predictor of the third neighboringblock to the motion vector list when the current neighboring block isthe third neighboring block and only when the third neighboring blockincludes a motion vector predictor, adding the motion vector predictorof the first neighboring block to the motion vector list when thecurrent neighboring block is the first neighboring block, only when thefirst neighboring block includes a motion vector predictor, and when thepredictor is different from the motion vector predictor of the secondneighboring block that has been added to the motion vector list; andadding the motion vector predictor of the fifth neighboring block to themotion vector list when the current neighboring block is the fifthneighboring block, only when the fifth neighboring block includes amotion vector predictor, and when the predictor is different from themotion vector predictor of the second neighboring block that has beenadded to the motion vector list.
 28. A device for building a motionvector list for motion vector prediction, comprising: a receiveroperated to obtain spatial neighboring blocks of a current predictionblock using a predefined position relationship between the spatialneighboring blocks and the current prediction blocks, wherein thecurrent prediction block to be predicated by using the motion vectorlist is located inside a current coding unit, and the spatialneighboring blocks of the prediction block comprise a first neighboringblock located at a bottom-left side of the prediction block, a secondneighboring block located at a left side of the prediction block, athird neighboring block located at a top-right side of the predictionblock, a fourth neighboring block located at a top side of theprediction block, and a fifth neighboring block located at a top-leftside of the prediction block; and a processor coupled to the receiverand programmed to: determine available neighboring blocks of the currentprediction block according to a partition manner of the current codingunit, wherein the available neighboring blocks are located outside thecurrent coding unit, and either wherein the current coding unit ispartitioned into a first prediction block and a second prediction blockon top and bottom sides, wherein the current prediction block is thesecond prediction block, and wherein the available neighboring blocks ofthe prediction block comprise the first neighboring block, the secondneighboring block, the third neighboring block, and the fifthneighboring block of the second prediction block, or wherein the currentcoding unit is partitioned into a first prediction block and a secondprediction block on left and right sides, wherein the current predictionblock is the second prediction block, and wherein the availableneighboring blocks of the prediction block comprise the firstneighboring block, the third neighboring block, the fourth neighboringblock, and the fifth neighboring block of the second prediction block;and obtain a plurality of motion vector predictors from the availableneighboring blocks in a preset sequence according to the motion vectorpredictors of the available neighboring blocks; when the current codingunit is partitioned into a first prediction block and a secondprediction block on left and right sides and the current predictionblock is the second prediction block: add the motion vector predictor ofthe fourth neighboring block to the motion vector list when the currentneighboring block is the fourth neighboring block and only when thefourth neighboring block includes a motion vector predictor; add themotion vector predictor of the third neighboring block to the motionvector list when the current neighboring block is the third neighboringblock, only hen the third neighboring block includes a motion vectorpredictor, and when the prediction value is different from the motionvector predictor of the fourth neighboring block that has been added tothe motion vector list; add the motion vector predictor of the firstneighboring block to the motion vector list when the current neighboringblock is the first neighboring block and only when the first neighboringblock includes a motion vector predictor; add the motion vectorpredictor of the fifth neighboring block to the motion vector list whenthe current neighboring block is the fifth neighboring block, only whenthe fifth neighboring block includes a motion vector predictor; and addthe motion vector predictor of the fifth neighboring block to the motionvector list when the predictor is different from the motion vectorpredictor of the fourth neighboring block that has been added to themotion vector list; or when the current coding unit is partitioned intoa first prediction block and a second prediction block on top and bottomsides and when the current prediction block is the second predictionblock: add the motion vector predictor of the second neighboring blockto the motion vector list when the current neighboring block is thesecond neighboring block and only when the second neighboring blockincludes a motion vector predictor; add the motion vector predictor ofthe third neighboring block to the motion vector list when the currentneighboring block is the third neighboring block and only when the thirdneighboring block includes a motion vector predictor, add the motionvector predictor of the first neighboring block to the motion vectorlist when the current neighboring block is the first neighboring block,only when the first neighboring block includes a motion vectorpredictor, and when the predictor is different from the motion vectorpredictor of the second neighboring block that has been added to themotion vector list; and add the motion vector predictor of the fifthneighboring block to the motion vector list when the current neighboringblock is the fifth neighboring block, only when the fifth neighboringblock includes a motion vector predictor, and when the predictor isdifferent from the motion vector predictor of the second neighboringblock that has been added to the motion vector list.